import Vue from 'vue';
import iView from 'iview';
import VueRouter from 'vue-router';
import router from './router';
import axios from 'src/utils/axios-interceptors'
import store from './vuex/store';
import App from './app.vue';
// import faker from 'faker';
import 'iview/dist/styles/iview.css';
import 'src/assets/css/common.css';

// import VueI18n from 'vue-i18n';
// import Locales from './locale';
// import zhLocale from 'iview/src/locale/lang/zh-CN';
// import enLocale from 'iview/src/locale/lang/en-US';

Vue.use(VueRouter);
// Vue.use(VueI18n);
Vue.use(iView);

Vue.prototype.$http = axios;
        
// faker.locale = "zh_CN";

// 自动设置语言
// const navLang = navigator.language;
// const localLang = (navLang === 'zh-CN' || navLang === 'en-US') ? navLang : false;
// const lang = window.localStorage.getItem('language') || localLang || 'zh-CN';

// Vue.config.lang = lang;

// 多语言配置
// const locales = Locales;
// const mergeZH = Object.assign(zhLocale, locales['zh-CN']);
// const mergeEN = Object.assign(enLocale, locales['en-US']);
// Vue.locale('zh-CN', mergeZH);
// Vue.locale('en-US', mergeEN);

new Vue({
    el: '#app',
    router: router,
    store,
    render: h => h(App)
});